package cn.zm.trip.web.dao;

import cn.zm.trip.web.domain.Reply;
import cn.zm.trip.web.domain.WordStatisticsEntity;
import cn.zm.trip.web.domain.Words;;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WordsDao extends BaseMapper<Words> {
	void deleteByPrimaryKey(Integer lw_id);

	/**
	 * 保存回复
	 * @param words
	 * @return
	 */
	void saveWords(Words words);

	/**
	 * 保存回复信息
	 * @param reply
	 */
	void saveReply(Reply reply);

	/**
	 * 查询所有留言信息
	 * @return
	 */
	List<Words> findByWords();

	/**
	 * 	查询所有回复信息
	 */
	List<Reply> findByReply();

	/**
	 * 留言统计信息
	 */
    List<WordStatisticsEntity> listWordStaticsByWordQuery(@Param("viewPointId") Integer viewPointId,
														  @Param("hotelId") Integer hotelId,@Param("foodId") Integer foodId);
}
